import { createApp } from "vue";
import App from "./App.vue";
import vant from 'vant'
import "bootstrap-icons/font/bootstrap-icons.css";
import 'vant/lib/index.css';
import './main.css';
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import { createI18n } from 'vue-i18n';
import them from "./them";
them.init()
const i18n = createI18n({
  locale: navigator.language || navigator.userLanguage, // 默认语言 'zh-CN'  en
  messages: {
    en: {
      back: 'Back',
      apply: 'Apply',
      save: 'Save',
      loadding:'loadding...',
      loaddingBottom:'had to bottom',
    },
    'zh-CN': {
      back: '返回',
      apply: '应用',
      save: '保存',
      loadding:'图片加载中...',
      loaddingBottom:'已经到底了',
    }
  }
});
const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    { path: '/', name: "home", component: () => import('./pages/home.vue') },
    { path: '/home', name: "home", component: () => import('./pages/home.vue') },
    { path: '/wallpaper', name: "wallpaper", component: () => import('./pages/wallpaper.vue') },
    { path: '/pointer', name: "pointer", component: () => import('./pages/pointer.vue') },
    { path: "/imagepreview", name: "ImagePreview", component: () => import("./pages/imagePreview.vue"), },
  ]
})

const app = createApp(App)
app.use(i18n)
app.use(router)
app.use(vant)
app.mount("#app");
